package com.uxhao.eduservice.client;

import com.uxhao.eduservice.entity.adminVo.DashboardVo;
import com.uxhao.eduservice.entity.adminVo.LineChartVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @author uxhao
 * @date 2021/1/25 16:30
 */
@Component
@FeignClient(value = "service-order", fallback = OrderFileDegradeFeignClient.class)
public interface OrderClient {
    //查询订单信息
    @GetMapping("/orderservice/order/isBuyCourse/{memberid}/{id}")
    boolean isBuyCourse(@PathVariable("memberid") String memberid, @PathVariable("id") String id);

    @GetMapping("/orderservice/order/countAllOrderAndAmount")
    DashboardVo countAllOrderAndAmount();

    @GetMapping("/orderservice/order/countLastAndCurrentOrderAndAmount")
    Map<String, Object> countLastAndCurrentOrderAndAmount();
}
